package com.thesis.manage.service.utils;

import com.thesis.manage.service.module.dto.UserLoginDTO;

/**
 * @author php
 * @date 2018/2/2
 */
public class UserHolder {
    private static final ThreadLocal<UserLoginDTO> THREAD_LOCAL = new ThreadLocal<>();

    public static void set(UserLoginDTO user) {
        THREAD_LOCAL.set(user);
    }

    public static UserLoginDTO get() {
        return THREAD_LOCAL.get();
    }

    public static void remove() {
        THREAD_LOCAL.remove();
    }
}
